<div class="card">
    <div class="card-header">
        <button class="btn btn-primary btn-sm" id="addAdminBtn">添加管理员</button>
    </div>
    <!-- /.card-header -->
    <div class="card-body">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th >id</th>
                    <th>用户名</th>
                    <th>注册时间</th>
                    <th>登录时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <% data.adminlist.forEach((item,index) =>{ %>
                    <tr>
                        <td><%= index+1 %></td>
                        <td><%= item.adminName %></td>
                        <td><%= item.regTime %></td>
                        <td><%= item.loginTime %></td>
                        <td>
                            <button class="btn btn-danger btn-sm delBtn" tid="<%= item._id %>">删除</button>
                        </td>
                    </tr>
                <% }) %>
                <!--
                <tr>
                    <td>1</td>
                    <td>admin</td>
                    <td>2023-01-18 12:34:56</td>
                    <td>2023-01-19 12:34:56</td>
                    <td>
                        <button class="btn btn-danger btn-sm delBtn">删除</button>
                    </td>
                </tr>
                <tr>
                    <td>1</td>
                    <td>admin</td>
                    <td>2023-01-18 12:34:56</td>
                    <td>2023-01-19 12:34:56</td>
                    <td>
                        <button class="btn btn-danger btn-sm delBtn">删除</button>
                    </td>
                </tr>-->
            </tbody>
        </table>
    </div>
    <!-- /.card-body -->
    <div class="card-footer clearfix">
        <ul class="pagination pagination-sm m-0 float-right">
            <li class="page-item"><a class="page-link" href="#">«</a></li>
                <li class="page-item">
                    <a class="page-link" href="#">1</a>
                </li>
                <li class="page-item active">
                    <a class="page-link" href="#">2</a>
                </li>
                <li class="page-item">
                    <a class="page-link" href="#">3</a>
                </li>
                <li class="page-item">
                    <a class="page-link" href="#">4</a>
                </li>
            <li class="page-item"><a class="page-link" href="#">»</a></li>
        </ul>
    </div>
</div>

<!-- 模态框 -->
<div class="modal fade" id="modal-default" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">添加管理员</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="card-body">
                <form name="adminForm" id="adminForm">
                    <div class="form-group">
                        <label for="exampleInputEmail1">用户名</label>
                        <input type="text" name="adminName"  class="form-control" placeholder="请输入用户名">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">密码</label>
                        <input type="password" name="password" class="form-control"  placeholder="请输入密码">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">确认密码</label>
                        <input type="password" name="repassword" class="form-control"  placeholder="请输入确认密码">
                    </div>
                </form>
                </div>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" id="saveBtn" class="btn btn-primary">保存</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>